package com.emser.unc.client.view;

import com.emser.unc.client.CloudMobile;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class WelcomeView extends Composite{
	private VerticalPanel verticalPanel;
	private int heightCenterPanel;
	public WelcomeView() {
		heightCenterPanel = CloudMobile.get().getHeightPanelCenter() - 40;
		verticalPanel = new VerticalPanel();
		initWidget(verticalPanel);
		verticalPanel.setSize("100%", CloudMobile.get().getHeightPanelCenter() + "px");
		initHPanelTitle();
		SimplePanel sPanel = new SimplePanel();
		sPanel.setSize("100%-1px",  heightCenterPanel + "px");
		verticalPanel.add(sPanel);
	}


	private void initHPanelTitle() {
		HorizontalPanel horizontalPanel = new HorizontalPanel();
		horizontalPanel.setStyleName("gwt-hPanelCenter");
		horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	    horizontalPanel.setSize("100%", "40px");
	    verticalPanel.add(horizontalPanel);  
	    verticalPanel.setCellHeight(horizontalPanel, "40px");
	    verticalPanel.setCellWidth(horizontalPanel, "100%");
	}

}
